﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess.ObjectTwo
{
   public class D_Search
    {
        DataTable tb = new DataTable();
        ConnectionToDataBase ex = new ConnectionToDataBase();
        public DataTable loadCompany(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeSelectQuery("SearchCompany", sqlParameters);
        }
        public DataTable loadCity(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeSelectQuery("SearchCity", sqlParameters);
        }
        public DataTable loadBran(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeSelectQuery("SearchSERVICES_ID", sqlParameters);
        }

    }
}
